<?php
	/*登录查询*/
 	('Access-Control-Allow-Origin：*');
	include("../config/mysql.php");
	$account=$_POST['account'];
    $password = $_POST['password'];
    $Mysql = new Mysql();
	$sql = "select * from examaccount where account = '{$account}' and password = '{$password}'";
	$arr = @mysqli_fetch_row($Mysql->conn->query($sql));
	if($arr[3] > 0){
		$loginCount = $arr[3] - 1;
		$Mysql->conn->query("UPDATE examaccount SET loginCount='{$loginCount}' where id = '{$arr[0]}'");
	}else{
		$arr = null;
	}
	echo json_encode($arr,JSON_UNESCAPED_UNICODE);
    $Mysql->close();

?>